package com.df.gamesynctest.handler;

import com.df.gamesynctest.entity.GameMap;
import com.df.gamesynctest.msg.MsgWrapper;

public class MsgDispatcher {

    private static MsgDispatcher dispatcher = new MsgDispatcher();
    private MsgDispatcher(){}

    public static MsgDispatcher getInstance(){
        return dispatcher;
    }

    public void distapcherMsg(MsgWrapper msg){
        //根据消息类型分发到不同的执行线程
        //未进入地图前的消息放入一个单独线程

        //已经在地图了，则放入地图线程
        GameMap.getInstance().receiveMapMsg(msg);
    }
}
